{% extends 'basic.html' %}
{% block title %}投票结果{% endblock %}
{% block content %}
    <h1 class="text-center text-warning">{{ question.id }}号问题投票结果</h1>
    <h3>{{ question.question_text }}</h3>
    <table class="table table-striped table-bordered table-hover">
        <thead class="bg-primary">
            <tr>
                <td>选项</td>
                <td>票数</td>
            </tr>
        </thead>
        <tbody>
            {% for choice in question.choice_set.all %}
                <tr>
                    <td>{{ choice.choice_text }}</td>
                    <td>{{ choice.votes }}</td>
                </tr>
            {% endfor %}
        </tbody>
    </table>
    <a class="btn btn-primary" href="{% url 'index' %}">返回首页</a>
{% endblock %}